package com.xnyzc.lhy.common.penum.cms;

/**
 * 是否默认价格
 *
 * @author wangshuo
 * @date 2019-09-09 14:23
 */
public enum EDefaultType {

    defaultNo(0, "否"),
    defaultYes(1, "是");

    public static EDefaultType find(Integer type) {
        EDefaultType eDriverType;
        switch (type) {
            case 0:
                eDriverType = EDefaultType.defaultNo;
                break;
            case 1:
                eDriverType = EDefaultType.defaultYes;
                break;
            default:
                throw new IllegalArgumentException("未设置");
        }
        return eDriverType;
    }

    private Integer value;
    private String desc;

    EDefaultType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return this.value;
    }

    public String getDesc() {
        return this.desc;
    }
}
